.class public Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;
.super Landroid/content/BroadcastReceiver;
.source "ZMDownloadReceiver.java"


# static fields
.field public static final DOWNLOADRECEIVER_CANCEL:Ljava/lang/String; = "com.zuimeia.sdk.download.cancel_by_hand"

.field public static final DOWNLOADRECEIVER_PAUSE:Ljava/lang/String; = "com.zuimeia.sdk.download.pause_by_hand"

.field public static final INTENT_DOWNLOAD_ID:Ljava/lang/String; = "com.zuimeia.sdk.download_download_id"

.field public static final INTENT_DOWNLOAD_STATUS:Ljava/lang/String; = "com.zuimeia.sdk.download_download_status"


# instance fields
.field mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;


# direct methods
.method public constructor <init>()V
    .registers 2

    .prologue
    .line 40
    invoke-direct {p0}, Landroid/content/BroadcastReceiver;-><init>()V

    .line 41
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;

    return-void
.end method

.method private handleNotificationBroadcast(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 11
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "intent"    # Landroid/content/Intent;

    .prologue
    const/4 v2, 0x0

    .line 99
    invoke-virtual {p2}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v1

    .line 100
    .local v1, "uri":Landroid/net/Uri;
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v6

    .line 111
    .local v6, "action":Ljava/lang/String;
    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    move-object v3, v2

    move-object v4, v2

    move-object v5, v2

    invoke-virtual/range {v0 .. v5}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v7

    .line 112
    .local v7, "cursor":Landroid/database/Cursor;
    if-nez v7, :cond_17

    .line 131
    :goto_16
    return-void

    .line 116
    :cond_17
    :try_start_17
    invoke-interface {v7}, Landroid/database/Cursor;->moveToFirst()Z
    :try_end_1a
    .catchall {:try_start_17 .. :try_end_1a} :catchall_3f

    move-result v0

    if-nez v0, :cond_21

    .line 129
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    goto :goto_16

    .line 120
    :cond_21
    :try_start_21
    const-string v0, "android.intent.action.DOWNLOAD_OPEN"

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_33

    .line 121
    invoke-direct {p0, p1, v7}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->openDownload(Landroid/content/Context;Landroid/database/Cursor;)V

    .line 122
    invoke-direct {p0, p1, v1, v7}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->hideNotification(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;)V
    :try_end_2f
    .catchall {:try_start_21 .. :try_end_2f} :catchall_3f

    .line 129
    :goto_2f
    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    goto :goto_16

    .line 123
    :cond_33
    :try_start_33
    const-string v0, "com.zuimeia.sdk.download.DOWNLOAD_LIST"

    invoke-virtual {v6, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_44

    .line 124
    invoke-direct {p0, p1, p2, v7}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->sendNotificationClickedIntent(Landroid/content/Context;Landroid/content/Intent;Landroid/database/Cursor;)V
    :try_end_3e
    .catchall {:try_start_33 .. :try_end_3e} :catchall_3f

    goto :goto_2f

    .line 129
    :catchall_3f
    move-exception v0

    invoke-interface {v7}, Landroid/database/Cursor;->close()V

    throw v0

    .line 126
    :cond_44
    :try_start_44
    invoke-direct {p0, p1, v1, v7}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->hideNotification(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;)V
    :try_end_47
    .catchall {:try_start_44 .. :try_end_47} :catchall_3f

    goto :goto_2f
.end method

.method private hideNotification(Landroid/content/Context;Landroid/net/Uri;Landroid/database/Cursor;)V
    .registers 13
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "uri"    # Landroid/net/Uri;
    .param p3, "cursor"    # Landroid/database/Cursor;

    .prologue
    const/4 v8, 0x0

    .line 142
    iget-object v5, p0, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;

    invoke-static {p2}, Landroid/content/ContentUris;->parseId(Landroid/net/Uri;)J

    move-result-wide v6

    invoke-interface {v5, v6, v7}, Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;->cancelNotification(J)V

    .line 144
    const-string v5, "status"

    invoke-interface {p3, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v1

    .line 145
    .local v1, "statusColumn":I
    invoke-interface {p3, v1}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    .line 146
    .local v0, "status":I
    const-string v5, "visibility"

    invoke-interface {p3, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v4

    .line 147
    .local v4, "visibilityColumn":I
    invoke-interface {p3, v4}, Landroid/database/Cursor;->getInt(I)I

    move-result v3

    .line 148
    .local v3, "visibility":I
    invoke-static {v0}, Lcom/zuimeia/sdk/download/providers/downloads/Downloads;->isStatusCompleted(I)Z

    move-result v5

    if-eqz v5, :cond_3d

    const/4 v5, 0x1

    if-ne v3, v5, :cond_3d

    .line 149
    new-instance v2, Landroid/content/ContentValues;

    invoke-direct {v2}, Landroid/content/ContentValues;-><init>()V

    .line 150
    .local v2, "values":Landroid/content/ContentValues;
    const-string v5, "visibility"

    const/4 v6, 0x0

    invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    invoke-virtual {v2, v5, v6}, Landroid/content/ContentValues;->put(Ljava/lang/String;Ljava/lang/Integer;)V

    .line 151
    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v5

    invoke-virtual {v5, p2, v2, v8, v8}, Landroid/content/ContentResolver;->update(Landroid/net/Uri;Landroid/content/ContentValues;Ljava/lang/String;[Ljava/lang/String;)I

    .line 153
    .end local v2    # "values":Landroid/content/ContentValues;
    :cond_3d
    return-void
.end method

.method private openDownload(Landroid/content/Context;Landroid/database/Cursor;)V
    .registers 11
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "cursor"    # Landroid/database/Cursor;

    .prologue
    .line 160
    const-string v5, "_data"

    invoke-interface {p2, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v5

    invoke-interface {p2, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 161
    .local v2, "filename":Ljava/lang/String;
    const-string v5, "mimetype"

    invoke-interface {p2, v5}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v5

    invoke-interface {p2, v5}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 162
    .local v3, "mimetype":Ljava/lang/String;
    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v4

    .line 164
    .local v4, "path":Landroid/net/Uri;
    invoke-virtual {v4}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v5

    if-nez v5, :cond_27

    .line 165
    new-instance v5, Ljava/io/File;

    invoke-direct {v5, v2}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    invoke-static {v5}, Landroid/net/Uri;->fromFile(Ljava/io/File;)Landroid/net/Uri;

    move-result-object v4

    .line 168
    :cond_27
    new-instance v0, Landroid/content/Intent;

    const-string v5, "android.intent.action.VIEW"

    invoke-direct {v0, v5}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 169
    .local v0, "activityIntent":Landroid/content/Intent;
    invoke-virtual {v0, v4, v3}, Landroid/content/Intent;->setDataAndType(Landroid/net/Uri;Ljava/lang/String;)Landroid/content/Intent;

    .line 170
    const/high16 v5, 0x10000000

    invoke-virtual {v0, v5}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 172
    :try_start_36
    invoke-virtual {p1, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
    :try_end_39
    .catch Landroid/content/ActivityNotFoundException; {:try_start_36 .. :try_end_39} :catch_3a

    .line 176
    :goto_39
    return-void

    .line 173
    :catch_3a
    move-exception v1

    .line 174
    .local v1, "ex":Landroid/content/ActivityNotFoundException;
    const-string v5, "DownloadManager"

    new-instance v6, Ljava/lang/StringBuilder;

    invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V

    const-string v7, "no activity for "

    invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v6

    invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v6

    invoke-static {v5, v6, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    goto :goto_39
.end method

.method private sendNotificationClickedIntent(Landroid/content/Context;Landroid/content/Intent;Landroid/database/Cursor;)V
    .registers 13
    .param p1, "mContext"    # Landroid/content/Context;
    .param p2, "intent"    # Landroid/content/Intent;
    .param p3, "cursor"    # Landroid/database/Cursor;

    .prologue
    const/4 v6, 0x1

    const/4 v4, 0x0

    .line 187
    const-string v7, "sendNotificationClickedIntent"

    new-array v8, v4, [Ljava/lang/Object;

    invoke-static {v7, v8}, Lcom/zuimeia/sdk/download/utils/LogTimber;->d(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 188
    const-string v7, "notificationpackage"

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v7

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v5

    .line 189
    .local v5, "pckg":Ljava/lang/String;
    if-nez v5, :cond_16

    .line 215
    :cond_15
    :goto_15
    return-void

    .line 193
    :cond_16
    const-string v7, "notificationclass"

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v7

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v1

    .line 194
    .local v1, "clazz":Ljava/lang/String;
    const-string v7, "is_public_api"

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getColumnIndex(Ljava/lang/String;)I

    move-result v7

    invoke-interface {p3, v7}, Landroid/database/Cursor;->getInt(I)I

    move-result v7

    if-eqz v7, :cond_2d

    move v4, v6

    .line 196
    .local v4, "isPublicApi":Z
    :cond_2d
    const/4 v0, 0x0

    .line 197
    .local v0, "appIntent":Landroid/content/Intent;
    if-eqz v4, :cond_40

    .line 198
    new-instance v0, Landroid/content/Intent;

    .end local v0    # "appIntent":Landroid/content/Intent;
    const-string v6, "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"

    invoke-direct {v0, v6}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 199
    .restart local v0    # "appIntent":Landroid/content/Intent;
    invoke-virtual {v0, v5}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 214
    :goto_3a
    iget-object v6, p0, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;

    invoke-interface {v6, v0}, Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;->sendBroadcast(Landroid/content/Intent;)V

    goto :goto_15

    .line 201
    :cond_40
    if-eqz v1, :cond_15

    .line 204
    new-instance v0, Landroid/content/Intent;

    .end local v0    # "appIntent":Landroid/content/Intent;
    const-string v7, "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"

    invoke-direct {v0, v7}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 205
    .restart local v0    # "appIntent":Landroid/content/Intent;
    invoke-virtual {v0, v5, v1}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 206
    const-string v7, "multiple"

    invoke-virtual {p2, v7, v6}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v6

    if-eqz v6, :cond_5c

    .line 207
    invoke-static {p1}, Lcom/zuimeia/sdk/download/providers/downloads/Downloads;->getContentURI(Landroid/content/Context;)Landroid/net/Uri;

    move-result-object v6

    invoke-virtual {v0, v6}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    goto :goto_3a

    .line 209
    :cond_5c
    const-string v6, "_id"

    invoke-interface {p3, v6}, Landroid/database/Cursor;->getColumnIndexOrThrow(Ljava/lang/String;)I

    move-result v6

    invoke-interface {p3, v6}, Landroid/database/Cursor;->getLong(I)J

    move-result-wide v2

    .line 210
    .local v2, "downloadId":J
    invoke-static {p1}, Lcom/zuimeia/sdk/download/providers/downloads/Downloads;->getContentURI(Landroid/content/Context;)Landroid/net/Uri;

    move-result-object v6

    invoke-static {v6, v2, v3}, Landroid/content/ContentUris;->withAppendedId(Landroid/net/Uri;J)Landroid/net/Uri;

    move-result-object v6

    invoke-virtual {v0, v6}, Landroid/content/Intent;->setData(Landroid/net/Uri;)Landroid/content/Intent;

    goto :goto_3a
.end method

.method private startService(Landroid/content/Context;)V
    .registers 4
    .param p1, "context"    # Landroid/content/Context;

    .prologue
    .line 218
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/zuimeia/sdk/download/providers/downloads/DownloadService;

    invoke-direct {v0, p1, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    invoke-virtual {p1, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName;

    .line 219
    return-void
.end method


# virtual methods
.method public onReceive(Landroid/content/Context;Landroid/content/Intent;)V
    .registers 13
    .param p1, "context"    # Landroid/content/Context;
    .param p2, "intent"    # Landroid/content/Intent;

    .prologue
    .line 49
    if-nez p2, :cond_3

    .line 93
    :cond_2
    :goto_2
    return-void

    .line 52
    :cond_3
    iget-object v7, p0, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;

    if-nez v7, :cond_e

    .line 53
    new-instance v7, Lcom/zuimeia/sdk/download/providers/downloads/RealSystemFacade;

    invoke-direct {v7, p1}, Lcom/zuimeia/sdk/download/providers/downloads/RealSystemFacade;-><init>(Landroid/content/Context;)V

    iput-object v7, p0, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->mSystemFacade:Lcom/zuimeia/sdk/download/providers/downloads/SystemFacade;

    .line 56
    :cond_e
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    const-string v8, "DownloadReceiver >>> "

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v7

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v7

    const/4 v8, 0x0

    new-array v8, v8, [Ljava/lang/Object;

    invoke-static {v7, v8}, Lcom/zuimeia/sdk/download/utils/LogTimber;->d(Ljava/lang/String;[Ljava/lang/Object;)V

    .line 58
    invoke-virtual {p2}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    .line 59
    .local v0, "action":Ljava/lang/String;
    const-string v7, "android.intent.action.BOOT_COMPLETED"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_3b

    .line 60
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->startService(Landroid/content/Context;)V

    goto :goto_2

    .line 61
    :cond_3b
    const-string v7, "android.net.conn.CONNECTIVITY_CHANGE"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_57

    .line 62
    const-string v7, "networkInfo"

    invoke-virtual {p2, v7}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v1

    check-cast v1, Landroid/net/NetworkInfo;

    .line 63
    .local v1, "info":Landroid/net/NetworkInfo;
    if-eqz v1, :cond_2

    invoke-virtual {v1}, Landroid/net/NetworkInfo;->isConnected()Z

    move-result v7

    if-eqz v7, :cond_2

    .line 64
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->startService(Landroid/content/Context;)V

    goto :goto_2

    .line 66
    .end local v1    # "info":Landroid/net/NetworkInfo;
    :cond_57
    const-string v7, "android.intent.action.DOWNLOAD_WAKEUP"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_63

    .line 67
    invoke-direct {p0, p1}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->startService(Landroid/content/Context;)V

    goto :goto_2

    .line 68
    :cond_63
    const-string v7, "android.intent.action.DOWNLOAD_OPEN"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_7b

    const-string v7, "com.zuimeia.sdk.download.DOWNLOAD_LIST"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-nez v7, :cond_7b

    const-string v7, "android.intent.action.DOWNLOAD_HIDE"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_7f

    .line 69
    :cond_7b
    invoke-direct {p0, p1, p2}, Lcom/zuimeia/sdk/download/providers/downloads/ZMDownloadReceiver;->handleNotificationBroadcast(Landroid/content/Context;Landroid/content/Intent;)V

    goto :goto_2

    .line 70
    :cond_7f
    const-string v7, "com.zuimeia.sdk.download.pause_by_hand"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_bf

    .line 71
    const-string v7, "com.zuimeia.sdk.download_download_id"

    const-wide/16 v8, -0x64

    invoke-virtual {p2, v7, v8, v9}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v4

    .line 72
    .local v4, "mId":J
    const-string v7, "com.zuimeia.sdk.download_download_status"

    const/16 v8, -0x64

    invoke-virtual {p2, v7, v8}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v6

    .line 73
    .local v6, "mStatus":I
    const-wide/16 v8, 0x0

    cmp-long v7, v4, v8

    if-ltz v7, :cond_2

    if-ltz v6, :cond_2

    .line 74
    const/16 v7, 0xbe

    if-eq v6, v7, :cond_a7

    const/16 v7, 0xc0

    if-ne v6, v7, :cond_2

    .line 75
    :cond_a7
    new-instance v3, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v7

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v3, p1, v7, v8}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;-><init>(Landroid/content/Context;Landroid/content/ContentResolver;Ljava/lang/String;)V

    .line 76
    .local v3, "mDownloadManager":Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;
    const/4 v7, 0x1

    new-array v7, v7, [J

    const/4 v8, 0x0

    aput-wide v4, v7, v8

    invoke-virtual {v3, v7}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->pauseDownload([J)V

    goto/16 :goto_2

    .line 80
    .end local v3    # "mDownloadManager":Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;
    .end local v4    # "mId":J
    .end local v6    # "mStatus":I
    :cond_bf
    const-string v7, "com.zuimeia.sdk.download.cancel_by_hand"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_100

    .line 81
    const-string v7, "com.zuimeia.sdk.download_download_id"

    const-wide/16 v8, -0x64

    invoke-virtual {p2, v7, v8, v9}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J

    move-result-wide v4

    .line 82
    .restart local v4    # "mId":J
    const-string v7, "com.zuimeia.sdk.download_download_status"

    const/16 v8, -0x64

    invoke-virtual {p2, v7, v8}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v6

    .line 83
    .restart local v6    # "mStatus":I
    const-wide/16 v8, 0x0

    cmp-long v7, v4, v8

    if-ltz v7, :cond_2

    if-ltz v6, :cond_2

    .line 84
    new-instance v3, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;

    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v7

    invoke-virtual {p1}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v8

    invoke-direct {v3, p1, v7, v8}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;-><init>(Landroid/content/Context;Landroid/content/ContentResolver;Ljava/lang/String;)V

    .line 85
    .restart local v3    # "mDownloadManager":Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;
    const/4 v7, 0x1

    new-array v7, v7, [J

    const/4 v8, 0x0

    aput-wide v4, v7, v8

    invoke-virtual {v3, v7}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->markRowDeleted([J)I

    .line 86
    const/4 v7, 0x1

    new-array v7, v7, [J

    const/4 v8, 0x0

    aput-wide v4, v7, v8

    invoke-virtual {v3, v7}, Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;->remove([J)I

    goto/16 :goto_2

    .line 88
    .end local v3    # "mDownloadManager":Lcom/zuimeia/sdk/download/providers/ZMDownloadManager;
    .end local v4    # "mId":J
    .end local v6    # "mStatus":I
    :cond_100
    const-string v7, "android.intent.action.DOWNLOAD_NOTIFICATION_CLICKED"

    invoke-virtual {v0, v7}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v7

    if-eqz v7, :cond_2

    .line 89
    new-instance v2, Landroid/content/Intent;

    const-class v7, Lcom/zuimeia/sdk/download/providers/downloads/ui/ZMDownloadListActivity;

    invoke-direct {v2, p1, v7}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 90
    .local v2, "it":Landroid/content/Intent;
    const/high16 v7, 0x10000000

    invoke-virtual {v2, v7}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 91
    invoke-virtual {p1, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V

    goto/16 :goto_2
.end method
